package com.mybindview.widget;

import android.content.Context;
import android.databinding.BindingAdapter;
import android.util.AttributeSet;
import android.widget.TextView;

/**
 * Created by nbzl on 2017/2/27.
 */
public class TextViewWidget extends TextView {


    public TextViewWidget(Context context) {
        this(context,null);
    }

    public TextViewWidget(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }

    @BindingAdapter({"firstName"})
    public static void setFirstName(TextView view,String txt){
         view.append(txt);
    }
    @BindingAdapter({"secondName"})
    public static void setSecondName(TextView view,String txt){
        view.append(txt);
    }
}
